import os

class Config:

    SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:ecnuSE2022@60.204.220.253/hospital'
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-key-please-change-in-production'
    
    SESSION_TYPE = 'filesystem'
    PERMANENT_SESSION_LIFETIME = 3600  # 1小时session过期
    
    ENV = os.environ.get('FLASK_ENV', 'development')
    DEBUG = ENV == 'development'
    
    LOG_LEVEL = 'DEBUG' if DEBUG else 'INFO'
    
    # 其他配置...
